//=============================================================================
//
//   Copyright (C) 2020 All rights reserved.
//
//   Filename:		lib.rs
//
//   Author: Wang Zhecheng - wangzhecheng@yeah.net
//
//   Date: 2020-09-21 19:22
//
//   Last Editors: Wang Zhecheng - wangzhecheng@yeah.net
//
//   Last modified:	2020-11-06 18:27
//
//   Description:
//
//=============================================================================
mod macros;

mod arith;
mod component;
mod consts;
mod dimension;
mod geometry;
mod io;
mod material;
// mod method;
mod util;

pub type Real = f32;
pub const TOL: Real = 1e-2;

// pub fn main() {
//     use component::model::Model;
//     use dimension::PlaneStrain;
//     use io::{
//         data_parser::{DataParser, JsonParser},
//         vtu_writer::VTUWriter,
//     };
//     use method::fem::Fem;
//     use std::env;

//     env::set_var("RUST_APP_LOG", "trace");
//     pretty_env_logger::init_custom_env("RUST_APP_LOG");

//     let input_file_name = "tool/gmshParser/example.json";
//     let parser = JsonParser::from_path(input_file_name);

//     let writer = VTUWriter::from_path(parser.get_path());

//     let mut model = Model::<Fem, PlaneStrain>::default();
//     model.set_parser(parser);
//     model.append_observer(Box::new(writer));
//     model.build_problem();
//     model.solve_problem();

//     // let mut b: Vec<std::io::Write> = std::vec::Vec::new();
//     // let mut w = EmitterConfig::default()
//     //     .perform_indent(true)
//     //     .create_writer(&mut b);

//     env::remove_var("RUST_APP_LOG");
// }
